package io.adrainty.bolee.framework.commons.serializer;

import com.fasterxml.jackson.databind.JavaType;

import java.util.HashMap;
import java.util.Map;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/10 下午11:23
 */
public class EnumDeserializerFactory {

    private EnumDeserializerFactory() {}

    private static final Map<JavaType, EnumDeserializer> deserializerMap = new HashMap<>();

    public static EnumDeserializer getDeserializer(JavaType javaType) {
        return deserializerMap.computeIfAbsent(javaType, EnumDeserializer::new);
    }

}
